﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FisheryPlatform.Entity;
using FisheryPlatform.Bussiness.ShareCode;

namespace FisheryPlatform.Web.Admin.ShareCode
{
    public partial class CodeList : System.Web.UI.Page
    {
        protected long ClassId = 0;
        protected long ParentId = 0;

        protected List<ShareCodeEntity> ShareCodeList = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            InitData();
        }

        private void InitData()
        {
            if (!long.TryParse(Request.QueryString["cid"], out ClassId) && ClassId > 0)
            {
                Response.Write("classId 错误");
                Response.End();
            }

            long.TryParse(Request.QueryString["pid"], out ParentId);

            ShareCodeList = ShareCodeManager.GetShareCodeListByClassIdAndPId(ClassId, ParentId);
        }
    }
}